﻿using ServiceStack.DataAnnotations;
using STHPMS1.BLL.B_Core;
using STHPMS1.Common.C_Entity.Stmpms1;
using STHPMS1.ICore;
using STHPMS1.ICore.I_BLL.Bus;
using STHPMS1.ICore.I_Entity.Info;
using STHPMS1.ICore.I_Entity.Stmpms1;
using STHPMS1.ICore.I_Serv;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using STHPMS1.Common.C_Extension;
using System.Linq;
using STHPMS1.Common.C_Enum;
using STHPMS1.ICore.I_Entity;


namespace STHPMS1.BLL.B_Bus
{
    public class Dm_Default_TrafficBus : BllBase, IDm_Default_TrafficBill
    {

        public void Save<T>(T entity)
              where T : class ,IEntity
        {
            this.Scene.Dal.Sthpms1.Save(entity);
        }

        public void Remove(IDm_Default_Traffic entity)
        {
            this.Scene.Dal.Sthpms1.DeleteById<Dm_Default_Traffic>(entity.Id);
        }

        public IEnumerable<T> Get<T>(Expression<Func<T, bool>> predicate, IPagingInfo info)
            where T : class, IEntity
        {
            return this.Scene.Dal.Sthpms1.Select<T>(predicate, info);
        }

    }
}
